/**
 * Define all of your application routes here
 * for more information on routes, see the
 * official documentation https://router.vuejs.org/en/
 */
export default [

    {
        path: '/login',
        view: 'Login'
    },
    {
        path: '/main',
        view: 'main/Main',
        meta: {
            requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
        },
        children: [{
            meta: {
                requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
            },
            path: '/dashboard',
            // Relative to /src/views
            view: 'main/Dashboard',
            icon: 'mdi-view-dashboard',
            text: 'Dashboard'
        },
            {
                meta: {
                    requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
                },
                path: '/user-profile',
                name: 'User Profile',
                view: 'main/UserProfile',
                icon: 'mdi-account',
                text: 'User Profile'
            },
            {
                meta: {
                    requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
                },
                path: '/table-list',
                name: 'Table List',
                view: 'main/TableList'
            },
            {
                meta: {
                    requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
                },
                path: '/typography',
                view: 'main/Typography'
            },
            {
                meta: {
                    requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
                },
                path: '/icons',
                view: 'main/Icons'
            },
            {
                meta: {
                    requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
                },
                path: '/maps',
                view: 'main/Maps'
            },
            {
                meta: {
                    requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
                },
                path: '/notifications',
                view: 'main/Notifications'
            },
            {
                path: '/upgrade',
                name: 'Upgrade to PRO',
                view: 'Upgrade'
            },
            {
                path: '/userInfo',
                name: 'userInfo',
                view: 'main/resource/Main',
                icon: 'mdi-bell',
                text: '资源管理'
            },
            {
                path: '/roleInfo',
                name: 'roleInfo',
                view: 'main/role/Main',
                icon: 'mdi-bell',
                text: '角色管理'
            }
        ]
    }
]
